package org.tale.mscp.sms.aliyun;

import com.google.gson.annotations.Expose;

public class RestResponse {

    public enum ResultEnum {
        tokenUnValid(-1),
        success(1),
        other(2),
        fail(-2);

        private final Integer value;

        // 构造器默认也只能是private, 从而保证构造函数只能在内部使用
        ResultEnum(Integer value) {
            this.value = value;
        }

        public Integer getValue() {
            return value;
        }
    }

    @Expose
    private Integer Result;
    @Expose
    private String Content;
    @Expose
    private String ResultDesc;
    @Expose
    private Object JsonContent;

    public void SetResult(ResultEnum result) {
        Result = result.getValue();
    }

    public Integer GetResult() {
        return Result;
    }

    public void SetData(String data) {
        Content = data;
    }

    public String GetData() {
        return Content;
    }

    public void SetResultDesc(String resultDesc) {
        ResultDesc = resultDesc;
    }

    public String GetResultDesc() {
        return ResultDesc;
    }

    public void SetJsonContent(Object jsonContent) {
        JsonContent = jsonContent;
    }

    public Object GetJsonContent() {
        return JsonContent;
    }
}
